<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="ArticuloEditDlg" widgetVar="ArticuloEditDialog" modal="true" resizable="false" appendTo="@(body)" header="#{bundle.EditArticuloTitle}">
            <h:form id="ArticuloEditForm">
                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{articuloController.selected != null}">
                        <p:outputLabel value="#{bundle.EditArticuloLabel_articuloPK_idarticulo}" for="articuloPK_idarticulo" />
                        <p:inputText id="articuloPK_idarticulo" value="#{articuloController.selected.articuloPK.idarticulo}" title="#{bundle.EditArticuloTitle_articuloPK_idarticulo}" required="true" requiredMessage="#{bundle.EditArticuloRequiredMessage_articuloPK_idarticulo}"/>
                        <p:outputLabel value="#{bundle.EditArticuloLabel_nombre}" for="nombre" />
                        <p:inputText id="nombre" value="#{articuloController.selected.nombre}" title="#{bundle.EditArticuloTitle_nombre}" />
                        <p:outputLabel value="#{bundle.EditArticuloLabel_abstract1}" for="abstract1" />
                        <p:inputTextarea rows="4" cols="30" id="abstract1" value="#{articuloController.selected.abstract1}" title="#{bundle.EditArticuloTitle_abstract1}" />
                        <p:outputLabel value="#{bundle.EditArticuloLabel_estado}" for="estado" />
                        <p:inputText id="estado" value="#{articuloController.selected.estado}" title="#{bundle.EditArticuloTitle_estado}" />
                        <p:outputLabel value="#{bundle.EditArticuloLabel_publicacion}" for="publicacion" />
                        <p:selectOneMenu id="publicacion" value="#{articuloController.selected.publicacion}" required="true" requiredMessage="#{bundle.EditArticuloRequiredMessage_publicacion}">
                            <f:selectItem itemLabel="#{bundle.SelectOneMessage}"/>
                            <f:selectItems value="#{publicacionController.itemsAvailableSelectOne}"
                                           var="publicacionItem"
                                           itemValue="#{publicacionItem}"/>
                        </p:selectOneMenu>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{articuloController.update}" value="#{bundle.Save}" update="display,:ArticuloListForm:datalist" oncomplete="handleSubmit(args, 'ArticuloEditDialog');"/>
                    <p:commandButton value="#{bundle.Cancel}" onclick="ArticuloEditDialog.hide()"/>
                </h:panelGroup>
            </h:form>
        </p:dialog>

    </ui:composition>
</html>
